<template>
  <div class="sms-template-container">
    <!-- 标签页 -->
    <div class="tab-container">
      <el-tabs v-model="activeName" class="custom-tabs">
        <el-tab-pane label="消息群发" name="SmsMassMessaging" style="font-size: 22px">
          <SmsMassMessaging ></SmsMassMessaging>
        </el-tab-pane>
        <el-tab-pane label="消息任务" name="SmsBulkTask" style="font-size: 22px">
          <SmsBulkTask ></SmsBulkTask>
        </el-tab-pane>
      </el-tabs>
    </div>
  </div>
</template>

<script>
import SmsMassMessaging from "@/views/smstask/SmsMassMessaging.vue";
import SmsBulkTask from "@/views/smstask/SmsBulkTask.vue";

export default {
  name: 'SmsTaskMessaging',
  components: {
    SmsMassMessaging,
    SmsBulkTask,
  },
  data() {
    return {
      activeName: 'SmsMassMessaging',
    }
  },
  created() {
  },
  computed: {
    handletab(tab) {
      console.log(tab);
    },
  },
}
</script>

<style scoped>
.sms-template-container {
  padding: 20px;
  background-color: #fff;
  min-height: 100vh;
}

/* 页面标题样式 */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.title-section {
  display: flex;
  align-items: center;
  gap: 12px;
}

.page-title {
  font-size: 22px;
  color: #303133;
  margin: 0;
  font-weight: 500;
}

.custom-tabs >>> .el-tabs__item {
  font-size: 15px;
  height: 50px;
  line-height: 50px;
}

.custom-tabs >>> .el-tabs__active-bar {
  height: 3px;
}

.version-tag {
  font-size: 12px;
  height: 22px;
  line-height: 20px;
  padding: 0 8px;
}

.header-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

/* 信息提示条样式 */
.info-alert {
  margin-bottom: 20px;
  border-radius: 4px;
  box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.05);
}

/* 标签页样式 */
.tab-container {
  margin-bottom: 20px;
}

/* 卡片头部样式 */
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-title {
  font-size: 16px;
  font-weight: 500;
  color: #303133;
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-title i {
  font-size: 18px;
  color: #409eff;
}

/* 模版列表卡片样式 */
.template-list-card {
  margin-bottom: 20px;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.05);
}

/* 筛选工具栏样式 */
.filter-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.left-section {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.right-section {
  display: flex;
  gap: 10px;
}

/* 分页容器样式 */
.pagination-container {
  display: flex;
  justify-content: flex-end;
  margin-top: 20px;
  padding: 10px 0;
}

.custom-pagination >>> .el-pagination__total,
.custom-pagination >>> .el-pagination__jump {
  margin-left: 16px;
}

.custom-pagination >>> .el-pagination__sizes {
  margin-left: 16px;
}

.custom-pagination >>> .el-pagination button {
  min-width: 32px;
  height: 32px;
}

.custom-pagination >>> .el-pager li {
  min-width: 32px;
  height: 32px;
  line-height: 32px;
}

/* 模版详情卡片样式 */
.template-detail-card {
  margin-bottom: 20px;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.05);
}

.template-content-preview {
  padding: 10px;
  background-color: #f8f8f8;
  border-radius: 4px;
  line-height: 1.5;
  word-break: break-all;
}

.reject-reason {
  color: #f56c6c;
}

/* 模版预览区域样式 */
.template-preview-section {
  margin-top: 20px;
}

.section-title {
  font-size: 16px;
  font-weight: 500;
  color: #303133;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid #ebeef5;
}

.phone-preview {
  display: flex;
  justify-content: center;
  padding: 20px 0;
}

.phone-frame {
  width: 240px;
  height: 400px;
  border: 8px solid #303133;
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background-color: #f0f0f0;
}

.phone-header {
  height: 40px;
  background-color: #303133;
  color: white;
  display: flex;
  justify-content: center;
  align-items: center;
}

.phone-content {
  flex: 1;
  padding: 12px;
  overflow-y: auto;
}

.message-bubble {
  background-color: #fff;
  border-radius: 10px;
  padding: 12px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.message-sender {
  font-weight: 500;
  margin-bottom: 8px;
  color: #409eff;
}

.message-content {
  line-height: 1.5;
  word-break: break-all;
}

.message-time {
  text-align: right;
  font-size: 12px;
  color: #909399;
  margin-top: 8px;
}

/* 变量管理卡片样式 */
.variables-card {
  margin-bottom: 20px;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.05);
}

.variables-list {
  margin-bottom: 16px;
}

.variables-tips {
  font-size: 12px;
  color: #909399;
  background-color: #f8f8f8;
  padding: 12px;
  border-radius: 4px;
  line-height: 1.5;
}

.variables-tips p {
  margin: 4px 0;
}

/* 内容底部样式 */
.content-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
}

.variable-buttons {
  display: flex;
  gap: 8px;
}

.char-counter {
  font-size: 12px;
  color: #606266;
}

.char-counter.warning {
  color: #e6a23c;
}

.message-count {
  margin-left: 4px;
  color: #409eff;
}

/* 模版预览框样式 */
.template-preview-box {
  margin-top: 20px;
  border: 1px solid #ebeef5;
  border-radius: 4px;
  overflow: hidden;
}

.preview-title {
  padding: 10px 15px;
  background-color: #f5f7fa;
  border-bottom: 1px solid #ebeef5;
  font-weight: 500;
  color: #303133;
}

.preview-content {
  padding: 15px;
  background-color: #fff;
}

.preview-message {
  line-height: 1.5;
  word-break: break-all;
}

.preview-signature {
  color: #409eff;
  font-weight: 500;
}

/* 预览对话框样式 */
.preview-dialog-content {
  display: flex;
  justify-content: center;
}

.phone-preview-large .phone-frame {
  width: 280px;
  height: 500px;
}

/* 导入对话框样式 */
.import-dialog-content {
  margin-bottom: 20px;
}

.import-tips {
  margin-top: 20px;
  font-size: 12px;
  color: #606266;
  background-color: #f8f8f8;
  padding: 12px;
  border-radius: 4px;
  line-height: 1.5;
}

.import-tips p {
  margin: 4px 0;
}

.import-tips a {
  color: #409eff;
  text-decoration: none;
}

/* 自定义表格样式 */
.custom-table {
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.05);
}

.custom-table >>> .el-table__header-wrapper th {
  background-color: #f5f7fa;
  color: #606266;
  font-weight: 500;
  height: 50px;
}

.custom-table >>> .el-table__row:hover {
  background-color: #f5f7fa;
}

/* 自定义按钮样式 */
.custom-button {
  border-radius: 4px;
  transition: all 0.3s;
}

.primary-button {
  background-color: #409eff;
  border-color: #409eff;
}

.primary-button:hover {
  background-color: #66b1ff;
  border-color: #66b1ff;
}

/* 操作按钮样式 */
.action-button {
  color: #409eff;
  margin-right: 10px;
}

.action-button:hover {
  color: #66b1ff;
}

/* 空数据状态 */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 50px 0;
  background-color: #f5f7fa;
  border-radius: 4px;
  margin-top: 20px;
  box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.05);
}

.empty-image {
  width: 100px;
  height: 100px;
  margin-bottom: 20px;
}

.empty-text {
  color: #909399;
  font-size: 14px;
}

/* 高亮样式 */
.highlight {
  color: #409eff;
  font-weight: 500;
}

/* 对话框样式 */
.custom-dialog >>> .el-dialog__header {
  padding: 20px;
  border-bottom: 1px solid #ebeef5;
}

.custom-dialog >>> .el-dialog__title {
  font-size: 18px;
  font-weight: 500;
  color: #303133;
}

.custom-dialog >>> .el-dialog__body {
  padding: 20px;
}

.custom-dialog >>> .el-dialog__footer {
  padding: 15px 20px;
  border-top: 1px solid #ebeef5;
}

/* 响应式样式 */
@media screen and (max-width: 1200px) {
  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .header-actions {
    width: 100%;
    justify-content: flex-end;
  }
}

@media screen and (max-width: 768px) {
  .sms-template-container {
    padding: 10px;
  }

  .filter-toolbar {
    flex-direction: column;
    gap: 16px;
  }

  .left-section,
  .right-section {
    width: 100%;
  }

  .right-section .el-input {
    width: 100% !important;
  }

  .header-actions {
    flex-direction: column;
  }

  .header-actions .el-button {
    width: 100%;
  }

  .phone-frame {
    width: 200px;
    height: 350px;
  }
}
</style>
